<form name="frmTable" class="form-horizontal" ng-init="dvm.init()" ng-submit="dvm.insert(frmTable.$valid)" novalidate>
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.cancel()">&times;</button>
    <h4 class="modal-title">表格</h4>
  </div>
  <div class="modal-body">
    <div class="form-group">
      <label class="col-sm-3 control-label">行数：</label>
      <div class="col-sm-9">
        <input type="number" name="rows" min="1" max="100" class="form-control" ng-model="dvm.rows" required
            ng-class="{'x-invalid': frmTable.$submitted && frmTable.rows.$invalid}" placeholder="1~100" autofocus>
        <p class="text-danger" ng-show="frmTable.$submitted && frmTable.rows.$error.required">行数不能为空</p>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">列数：</label>
      <div class="col-sm-9">
        <input type="number" name="columns" min="1" max="100" class="form-control" ng-model="dvm.columns" required
            ng-class="{'x-invalid': frmTable.$submitted && frmTable.columns.$invalid}" placeholder="1~100">
        <p class="text-danger" ng-show="frmTable.$submitted && frmTable.columns.$error.required">列数不能为空</p>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-default" ng-disabled="frmTable.$invalid">
      <i class="fa fa-plus"></i> 插入</button>
    <button type="button" class="btn btn-default" ng-click="dvm.cancel()">
      <i class="fa fa-times"></i> 取消</button>
  </div>
</form>
